Skip to content

🐛 [#718] Fix 500 error on duplicate UUID when creating objects#727

Merged
stevenbal merged 1 commit intomasterfrom
issue/718-POST-to-objecten-with-existing-UUID-raises-500-error
Feb 9, 2026
Merged

🐛 [#718] Fix 500 error on duplicate UUID when creating objects#727
stevenbal merged 1 commit intomasterfrom
issue/718-POST-to-objecten-with-existing-UUID-raises-500-error

Conversation

@OlhaZahoruiko
Copy link
Contributor

@OlhaZahoruiko OlhaZahoruiko commented Feb 5, 2026

Fixes #718

Changes

[Describe the changes here]

@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.98%. Comparing base (f6f9670) to head (8c5a4db).

Files with missing lines Patch % Lines
src/objects/api/serializers.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #727   +/-   ##
=======================================
  Coverage   84.97%   84.98%           
=======================================
  Files         141      141           
  Lines        2842     2843    +1     
  Branches      224      224           
=======================================
+ Hits         2415     2416    +1     
  Misses        375      375           
  Partials       52       52           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

@OlhaZahoruiko OlhaZahoruiko force-pushed the issue/718-POST-to-objecten-with-existing-UUID-raises-500-error branch from e36ff95 to c40133f Compare February 5, 2026 14:21
@OlhaZahoruiko OlhaZahoruiko marked this pull request as ready for review February 5, 2026 14:22
Copy link
Contributor

@Floris272 Floris272 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Object.objects.create should be get_or_create, since you need to be able to create new records of the same object.

It's possible it will still fail when this is added because the unique_together constraint from the ObjectRecord model is not added to the serializer Validators because its overwritten, so it may need to be added there manually.

@OlhaZahoruiko OlhaZahoruiko force-pushed the issue/718-POST-to-objecten-with-existing-UUID-raises-500-error branch from c40133f to c201914 Compare February 9, 2026 11:15
@stevenbal stevenbal mentioned this pull request Feb 9, 2026
1 task
@OlhaZahoruiko OlhaZahoruiko force-pushed the issue/718-POST-to-objecten-with-existing-UUID-raises-500-error branch from 3c13389 to f1fda78 Compare February 9, 2026 11:56
@OlhaZahoruiko OlhaZahoruiko force-pushed the issue/718-POST-to-objecten-with-existing-UUID-raises-500-error branch from a867ccc to 8c5a4db Compare February 9, 2026 12:11
@stevenbal stevenbal requested a review from Floris272 February 9, 2026 14:08
@stevenbal stevenbal merged commit 13b0d5f into master Feb 9, 2026
40 of 41 checks passed
@stevenbal stevenbal deleted the issue/718-POST-to-objecten-with-existing-UUID-raises-500-error branch February 9, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

POST to /objecten with existing UUID raises 500 error

4 participants